﻿@model HdipCricketClub.ViewModels.ScorecardBatAndBowlViewModel
@{
    ViewBag.Title = "DeleteAbandonedScorecardBatAndBowlBattedSecond";
}
<h2>
    DeleteAbandonedScorecardBatAndBowlBattedSecond</h2>
@using (@Html.BeginForm("DeleteScorecard", "Scorecard", FormMethod.Post))
{
    <fieldset>
        <legend>Fixture</legend>
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.fixture_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.team_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.opponent_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.type)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.home)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.date)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.start_time)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.no_of_players)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.fixture_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.result_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.scorecard_entered)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.won_toss)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.batted_first)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.batted)
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.bowled)
        <br />
        @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.Club.ShortName) @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.name)
        vs @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.club_name) @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.team_name)
        <br />
        Played on: @Html.DisplayFor(ModelItem => Model.ScorecardFixture.date)
        <br />
        At:
        @if (Model.ScorecardFixture.home)
        {
            @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.Club.ShortName)
        }
        else
        {
            @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.club_name)
        }
        <br />
        <br />
        @if (Model.ScorecardHeaderDetail.won_toss)
        {
            @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.Club.ShortName)
            @:won the toss and elected to bat.
}
        else
        {
            @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.club_name)
            @:won the toss and elected to field first.
        }
        <br />
        <br />
        Result: Match Abandoned No Result.
        <br />
    </fieldset>

    <fieldset>
        <legend>Innings of @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.club_name)</legend>
        <br />
        <table>
            <tr>
                <th>
                </th>
                <th>
                    Name
                </th>
                <th>
                    How Out
                </th>
                <th>
                    Fielder
                </th>
                <th>
                    Bowler
                </th>
                <th>
                    Runs
                </th>
            </tr>
            @foreach (var item in Model.OpponentBatsmen)
            {
                <tr>
                    <td class="column_ids">
                        @Html.DisplayFor(modelItem => item.op_batsman_number)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.op_player_name)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelitem => item.DismissalType.type)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.Member.InitialAndLastName)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.Member1.InitialAndLastName)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.op_batting_runs)
                    </td>
                </tr>
            }
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Sub Total:
                </td>
                <td>
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.TotalOpponentBatsmenRuns)
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Byes:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.OpponentOtherDetail.byes)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Leg Byes:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.OpponentOtherDetail.leg_byes)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Wides:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.OpponentOtherDetail.wides)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    No Balls:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.OpponentOtherDetail.no_balls)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Total Extras:
                </td>
                <td>
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.TotalOpponentExtras)
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Total For @Html.DisplayFor(ModelItem => Model.OpponentOtherDetail.wickets_lost)
                    wkts
                </td>
                <td>
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.OpponentOtherDetail.total_runs)
                </td>
            </tr>
        </table>
        <br />
        <table>
            <tr>
                <th>
                </th>
                <th>
                    Name:
                </th>
                <th>
                    Overs:
                </th>
                <th>
                    Maidens:
                </th>
                <th>
                    Runs:
                </th>
                <th>
                    Wickets:
                </th>
            </tr>
            @foreach (var item in Model.ClubBowlers)
            {
                <tr>
                    @Html.HiddenFor(modelItem => item.fixture_id)
                    @Html.HiddenFor(modelItem => item.player_id)
                    @Html.HiddenFor(modelItem => item.bowler_number)
                    <td class="column_ids">
                        @Html.DisplayFor(modelItem => item.bowler_number)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.Member.InitialAndLastName)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.overs)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.maidens)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.bowling_runs)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.wickets)
                    </td>
                </tr>
            }
        </table>
    </fieldset>
    <fieldset>
        <legend>Innings of @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.Club.ShortName)</legend>
        <br />
        <table>
            <tr>
                <th>
                </th>
                <th>
                    Name
                </th>
                <th>
                    How Out
                </th>
                <th>
                    Fielder
                </th>
                <th>
                    Bowler
                </th>
                <th>
                    Runs
                </th>
            </tr>
            @foreach (var item in Model.ClubBatsmen)
            {
                <tr>
                    <td class="column_ids">
                        @Html.DisplayFor(modelItem => item.batsman_number)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.Member.InitialAndLastName)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelitem => item.DismissalType.type)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.fielder_name)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.bowler_name)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.batting_runs)
                    </td>
                </tr>
            }
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Sub Total
                </td>
                <td>
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.TotalClubBatsmenRuns)
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Byes:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.ClubOtherDetail.byes)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Leg Byes:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.ClubOtherDetail.leg_byes)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Wides:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.ClubOtherDetail.wides)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    No Balls:
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.ClubOtherDetail.no_balls)
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Total Extras:
                </td>
                <td>
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.TotalClubExtras)
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    Total Score For : @Html.DisplayFor(ModelItem => Model.ClubOtherDetail.wickets_lost)
                    wkts
                </td>
                <td>
                </td>
                <td class="column_numbers">
                    @Html.DisplayFor(ModelItem => Model.ClubOtherDetail.total_runs)
                </td>
            </tr>
        </table>
        <br />
        <table>
            <tr>
                <th>
                </th>
                <th>
                    Name:
                </th>
                <th>
                    Overs:
                </th>
                <th>
                    Maidens:
                </th>
                <th>
                    Runs:
                </th>
                <th>
                    Wickets:
                </th>
            </tr>
            @foreach (var item in Model.OpponentBowlers)
            {
                <tr>
                    <td class="column_ids">
                        @Html.DisplayFor(modelItem => item.op_bowler_number)
                    </td>
                    <td class="column_names">
                        @Html.DisplayFor(modelItem => item.op_player_name)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.op_overs)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.op_maidens)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.op_bowling_runs)
                    </td>
                    <td class="column_numbers">
                        @Html.DisplayFor(modelItem => item.op_wickets)
                    </td>
                </tr>
            }
        </table>
    </fieldset>
    <p>
        <input type="submit" value="Confirm Delete" />
    </p>   
}